<template>
  <div class="movie_item" @click="handelJump(amovie.id)">
    <div class="pic">
      <img :src="amovie.pic" alt="" />
    </div>
    <div class="msg">
      <p>{{ amovie.title }}</p>
      <p>评分 {{ amovie.raiting }}</p>
      <p>{{ labels }}</p>
    </div>
  </div>
</template>

<script setup>
import { useJumpHooks } from '../Hooks/useJumpHooks'
const $props = defineProps({
  amovie: {
    type: Object,
    require: true,
  },
});
const labels = computed(() => {
  return $props.amovie.labels.join("/");
});
const {handelJump} = useJumpHooks()
</script>

<style lang="scss" scoped>
.movie_item {
  display: flex;
  margin-top: 20px;
  padding: 20px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  line-height:1.5;
  &:hover {
    background-color: #652e8064;
  }
  .pic {
    width: 100px;
    height: 150px;
    margin-right: 20px;
    img {
      width: 100%;
      height: 100%;
    }
  }
}
</style>
